home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sun Solutions 2000 #2
/
Sun Solutions CD (Volume 2 2000)(Special Focus - Java Technologies)(Disc 1).ISO
/
products
/
Software
/
BostonBusinessComputing
/
bbc
/
dist
/
vascent
< prev
next >
Wrap
Text File
|
2000-02-11
|
2KB
|
95 lines
#
# VSH script for use with Ascent*DNI transport software
#
IF ( v_com == "rl" ) THEN
SET v_node=v_n1
ENDIF
SET v_n1 = v_n1 + (v_fs1:va)
SET v_n2 = v_n2 + (v_fs2:va)
IF ( -n v_n1 ) THEN
SET v_n1 = v_n1 + "::"
ELSE
SET v_n2 = v_n2 + "::"
ENDIF
# Set qualifier strings
IF ( q_image ) SET vq_image = " -v "
IF ( q_log ) SET vq_log = " -l "
IF ( q_full ) SET vq_full = " -l "
IF ( q_confirm ) SET vq_confirm = " -i "
IF ( q_date ) SET vq_date = " -U "
IF ( q_size ) SET vq_size = " -s "
IF ( q_ ) SET vq_ = " -i "
# Execute the appropriate command
IF ( v_com == "bt" ) THEN
ERROR "%VNET-W-NOBACKUP, Vbackup remote disk saveset operation is not currently
supported for this network"
# exit here to test for existence of vnet for vbackup
EXIT 1
ELSE IF ( v_com == "cp" ) THEN
IF ( ! q_replace ) THEN
ERROR "%VNET-E-NOREPL the REPLACE qualifier is not currently supported
for this network"
EXIT
ENDIF
SET quals = vq_image + vq_log + vq_confirm
SET inf = v_n1 + v_d1 + v_f1
SET outf = v_n2 + v_d2 + v_f2
SET netcom = "netcp " + quals + "\'" + inf +"\' \'"+ outf+"\'"
SHELL netcom
EXIT
ELSE IF ( v_com == "lp" ) THEN
SET inf = v_n1 + v_d1 + v_f1
SET netcom = "netlpr " + quals + "\'" + inf +"\'"
SHELL netcom
EXIT
ELSE IF ( v_com == "ls" ) THEN
SET quals = vq_full + vq_size + vq_date
SET inf = v_n1 + v_d1 + v_f1
SET netcom = "netls " + quals + "\'" + inf +"\'"
SHELL netcom
EXIT
ELSE IF ( v_com == "ma" ) THEN
SET netcom="/usr/lib/sendmail -t "+ recips + " " + text
SHELL netcom
EXIT
ELSE IF ( v_com == "mv" ) THEN
SET quals = vq_log + vq_confirm
SET inf = v_n1 + v_d1 + v_f1
SET outf = v_n2 + v_d2 + v_f2
SET netcom = "netmv " + quals + "\'" + inf +"\' \'"+ outf+"\'"
SHELL netcom
EXIT
ELSE IF ( v_com == "rl" ) THEN
SET netcom = "sethost " + v_node + " < /dev/tty"
SHELL netcom
EXIT
ELSE IF ( v_com == "rm" ) THEN
SET quals = vq_log + vq_confirm
SET inf = v_n1 + v_d1 + v_f1
SET netcom = "netrm " + quals + "\'" + inf +"\'"
SHELL netcom
EXIT
ELSE IF ( v_com == "sn" ) THEN
SET netcom = "ncp show known nodes"
SHELL netcom
EXIT
ELSE IF ( v_com == "ty" ) THEN
SET outf = "/tmp/v_" + pid
TRAP "/bin/rm -f " + outf 0 2
SET inf = v_n1 + v_d1 + v_f1
SET quals = vq_full
SET netcom = "netcp " + quals + "\'" + inf +"\' \'"+ outf+"\'"
SHELL netcom
IF ( -e outf ) SHELL "/bin/cat " + outf + " ; /bin/rm " + outf
EXIT
ELSE
ERROR "%VNET-W-IVCOMM, Invalid command."
ENDIF